/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package teste;

/**
 *
 * @author Caio Valentim
 */
public class Ponto extends PontoPrototype {

    
    protected Ponto (PontoPrototype p1){
        this.coordenadax=p1.getCoordenadax();
        this.coordenaday=p1.getCoordenaday();
        this.confrontante=p1.getConfrontante();
    }
    protected Ponto (int x,  int y , String nome){
        this.coordenadax=x;
        this.coordenaday=y;
        this.confrontante=nome;
    }
    @Override
    public void exibirInfo() {
       System.out.println("Coordenada x : "+ getCoordenadax() +" e coordenada y :"+ getCoordenaday()+ " e confrontando-se com : "+getConfrontante());
    }

    @Override
    public PontoPrototype clonar() {
        return new Ponto(this);
    }
    
}
